﻿@model StripeDemo.Models.Cards

@{
    ViewBag.Title = "Detail";
}
<h2>Edit</h2>
@using (Html.BeginForm(Html.BeginForm("Save", "Payment", FormMethod.Post, new { @class = "form-horizontal", role = "form" })))
{
    @Html.AntiForgeryToken()
    <div class="form-horizontal">
        <h4>@ViewBag.MsgText</h4>
        <hr />
        @Html.ValidationSummary(true)
        @Html.HiddenFor(model => model.CardId)

        <div class="form-group">
            @Html.LabelFor(model => model.CardNumber, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.CardNumber)
                @Html.ValidationMessageFor(model => model.CardNumber)
            </div>
        </div>

        <div class="form-group">
            @Html.LabelFor(model => model.ExpiresMonth, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.ExpiresMonth)
                @Html.ValidationMessageFor(model => model.ExpiresMonth)
            </div>
        </div>
        <div class="form-group">
            @Html.LabelFor(model => model.ExpiresYear, new { @class = "control-label col-md-2" })
            <div class="col-md-10">
                @Html.EditorFor(model => model.ExpiresYear)
                @Html.ValidationMessageFor(model => model.ExpiresYear)
            </div>
        </div>
        <div class="form-group">
            <div class="col-md-offset-2 col-md-10">
                <input type="submit" value="Save" class="btn btn-default" />
            </div>
        </div>
    </div>

}
<div>
    @Html.ActionLink("Back to List", "ListAll")
</div>
@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}

